﻿@model GameSchoolApplication.Models.StudentLevelPoints

@{
    ViewBag.Title = "Núverandi borð";
    Layout = "~/Views/Shared/_StudentLayout.cshtml";
}

<h2>Núverandi borð í: @Model.Level.Game.Title</h2>
<table class="IndexTable">
    <caption>Verkefni</caption>
    @if (Model.Level.Assignments.Count == 0)
    { 
        <tr><td>Engin verkefni skráð fyrir þetta borð.</td></tr>
    }
    else
    {
        <tr>
            <th>Titill</th>
            <th>&nbsp;</th>
        </tr>
        foreach (var assignment in Model.Level.Assignments)
        { 
            <tr>
                <td>@assignment.Title</td>
                <td>@Html.ActionLink("Nánar", "HandIn", "Assignment", new { assignmentId = assignment.AssignmentId }, new { })</td>
            </tr>
        }
    }
</table>

<table class="IndexTable">
    <caption>Próf</caption>
    @if (Model.Level.Tests.Count == 0)
    { 
        <tr><td>Engin próf skráð fyrir þetta borð.</td></tr>
    }
    else
    {
        <tr>
            <th>Nafn</th>
            <th>&nbsp;</th>
        </tr>
        foreach (var test in Model.Level.Tests)
        { 
            <tr>
                <td>@test.TestName</td>
                <td>@Html.ActionLink("Nánar", "HandIn", "Test", new { testId = test.TestId }, new { })</td>
            </tr>
        }
    }
</table>

<table class="IndexTable">
    <caption>Myndbönd</caption>
    @if (Model.Level.Videos.Count == 0)
    { 
        <tr><td>Engin myndbönd skráð fyrir þetta borð.</td></tr>
    }
    else
    {
        <tr>
            <th>Nafn</th>
            <th>&nbsp;</th>
        </tr>
        foreach (var video in Model.Level.Videos)
        { 
            <tr>
                <td>@video.Title</td>
                <td>@Html.ActionLink("Nánar", "Watch", "Video", new { id = video.VideoId }, new { })</td>
            </tr>
        }
    }
</table>

<p>
    <a href="@(Url.RouteUrl(new { controller = "Game", action = "StudentGames" }) + "#game-" + Model.Level.GameId)">Til baka í leiki</a>
</p>
